<?php
namespace app\index\controller;
use think\Controller;
class Api extends Controller
{
    public function index()
    {

    	$url = "http://api.baidu88.com/v1/token?appid=admin&appkey=384593sbdkjsdfhjkhsdfhj";


    	$data = file_get_contents($url);

    	$token = json_decode($data,true)['token'];

    	session('token',$token);

    	// var_dump(json_decode($data,true));
    }

    public function test()
    {
    	
    	$url = "http://api.baidu88.com/v1/user/get?token=".session('token')."&uid=435345";

    	$data = file_get_contents($url);

    	var_dump($data);

    	$data = json_decode($data,true);

    	var_dump($data);


    }
}

